using Ellwood.Manage.Common.Core.Basis.Entity;
using SqlSugar;

namespace Ellwood.Manage.Models.Entity;

/// <summary>
/// 菜单实体--数据库对应
/// </summary>
[SugarTable("sys_menu")]
public class SysMenu: BaseEntity
{

    /// <summary>
    /// 菜单ID
    /// </summary>
    [SugarColumn(IsPrimaryKey = true)]
    public Guid Id { get; set; }
    
    /// <summary>
    /// 父级ID
    /// </summary>
    [SugarColumn(ColumnName = "ParentId")]
    public Guid ParentId { get; set; }

    /// <summary>
    /// 菜单名称
    /// </summary>
    [SugarColumn(ColumnDataType = "nvarchar",Length = 150, ColumnDescription = "菜单名称")]
    public string? MenuText { get; set; }
    
    /// <summary>
    /// 全名称--多级菜单--  一级==二级菜单==三次
    /// </summary>
    [SugarColumn(IsNullable = true)]
    public string? FullName { get; set; }
    
    /// <summary>
    /// 控制器名称
    /// </summary>
    [SugarColumn(IsNullable = true)]
    public string? ControllerName { get; set; }
    
    /// <summary>
    /// 方法名称
    /// </summary>
    [SugarColumn(IsNullable = true)]
    public string? ActionName { get; set; }

    /// <summary>
    /// 菜单类型：0：菜单功能；1：按钮功能
    /// </summary>
    public int MenuType { get; set; }

    /// <summary>
    /// 递归类型
    /// </summary>
    [SugarColumn(IsIgnore = true)]
    public List<SysMenu>? MenuChildList { get; set; }

}